<?php


namespace app\user\model;


use app\index\model\Base;

class LoveArt extends Base
{
    protected $pk = 'id';
    public function zan()
    {
        return $this->hasMany('Lovezan','love_id','id');
    }
    public function img()
    {
        return $this->hasMany('Loveimg','love_id','id');
    }
    public function comment()
    {
        return $this->hasMany('Lovelist','love_id','id');
    }
    public function user()
    {
        return $this->belongsTo('User','u_id','u_id');
    }
      public function getcTimeAttr($t)
  {
      return Date('Y-m-d H:i:s',$t);
  }
}